<tagLib name="html" />
{$header}
<div id="main" class="main" >
<!-- 主体内容  -->
<div class="content" >
  
<!--  功能组区域  -->
<div class="btn-toolbar">
      <div class="btn-group">
  <button class="btn btn-primary" onclick="add()"><i class="icon-plus icon-white"></i> 新增</button>
  <button class="btn btn-primary" onclick="charge()"><i class="icon-user icon-white"></i> 分配</button>
  <button class="btn btn-primary" onclick="tocheck()"><i class="icon-warning-sign icon-white"></i>待分配</button>
<button class="btn btn-primary" onclick="foreverdel()"><i class="icon-trash icon-white"></i> 删除</button>
</div>
<!-- 查询区域 -->
<form class="search-form pull-right" method='get' action="__URL__">
    <input type="text" class="search-query span2" name="inquiry_mano" <notempty name='_REQUEST.inquiry_mano'>
    <php>echo 'value="'.urldecode($_REQUEST['inquiry_mano']).'"'</php>
    <else/>
    placeholder="搜索询单号"
  </notempty>
  >
  <input type="submit" class="btn btn-primary" value="搜索询单号"></form>
<form class="search-form pull-right" method='post' action="__URL__">
    负责人{:modList('User',$_REQUEST['charge_man'],'span2','charge_man')}
	{:configList(C('askStatus'),$_REQUEST['status'])}
		<input type="text" class="search-query span4" name="keywords" <notempty name='_REQUEST.keywords'>
		<php>echo 'value="'.urldecode($_REQUEST['keywords']).'"'</php>
		<else/>
		placeholder="搜索"
	</notempty>
	>
	<input type="submit" class="btn btn-primary" value="搜索"></form>
</div>
<!-- 功能组区域结束 -->
<php>
    function getInquiryLink($id){
    	echo '<a href="__APP__/Inquiry/edit/id/'.$id.'" target="_blank">'.getModelName($id,'Inquiry','mano').'</a>';
	}

	function getInquiryNo($id){
		return getModelName($id,'Inquiry','mano');
	}
</php>
<!-- 列表显示区域  -->
<div class="list" >
<div id="result" class="result none"></div>
<div class="btn-toolbar">
  <div class="btn-group">
    <a href="__URL__/index" class="btn"><i class="icon-th-list"> </i>全部询价</a>
    <?php $ods = C('askStatus'); ?>
    <a href="__URL__/index/charge_man/{:$_SESSION[C('USER_AUTH_KEY')]}" class="btn"><i class="icon-flag"> </i>我的询价单</a>
    <foreach name="ods" item="vo">

      <?php if ($key != 5  and $key != 9): ?>
        <a href="__URL__/index/status/{$key}/charge_man/{:$_SESSION[C('USER_AUTH_KEY')]}" class="btn"><i class="icon-th-list"> </i>{$vo}</a>
      <?php endif ?>
    </foreach>
    </div>
  </div>
<html:list id="checkList" style="table table-bordered table-striped" name="action" checkbox="true" action="true" datasource="list" show="id:编号|5%:edit,mano:询价单号:edit,inquiry_id|getInquiryNo:询单号,product_id|getPfullName:产品,product_id|getCas:CAS,number:数量,specification:询单要求,create_time|toDate:创建时间,update_time|toDate:修改时间,priority|getConfigVal=priority:优先级,status|getConfigVal='askstatus':状态,charge_man|getModelName=User:负责人,user_id|getModelName=User:操作人" actionlist="edit:详情:id" />
</div>
<!--  分页显示区域 -->
<div class="page">{$page}</div>
<!-- 列表显示区域结束 -->
</div>
<!-- 主体内容结束 -->
</div>
<!-- 主页面结束 -->
<include file="Public:footer"/>
<script type="text/javascript">
function charge(id){
    var keyValue;
    if (id)
    {
      keyValue = id;
    }else {
      keyValue = getSelectCheckboxValues();
    }
    if (!keyValue)
    {
      alert('请选择询价单！');
      return false;
    }
    location.href=URL+"/charge/id/"+keyValue;
  }
</script>
